package com.okRPC.protocol;

import lombok.Getter;

/**
 * Description: This is a sample class.
 * Author: Simon
 * Date: 2023/10/10
 */
public enum MessageStatus {

    SUCCESS((byte)0),
    FAILED((byte)1);

    @Getter
    private final byte code;

    MessageStatus(byte code){
        this.code=code;
    }

    public static boolean isSuccess(byte code){
        return MessageStatus.SUCCESS.code==code;
    }
}
